package com.zr.dao.dispatch;

import com.zr.vo.dispatch.DispatchTicket;

import java.util.Date;
import java.util.List;

/**
 * @author Administrator
 */
public interface DispatchTicketDao {

    int deleteByPrimaryKey(Integer id);

    int insert(DispatchTicket record);

    int insertSelective(DispatchTicket record);

    DispatchTicket selectByPrimaryKey(Integer id);

    DispatchTicket selectByPrimaryKey2(Integer id);

    int updateByPrimaryKeySelective(DispatchTicket record);

    int updateByPrimaryKey(DispatchTicket record);
    /**
     * 条件查询调度单列表
     *
     * @param dispatchTicket
     * @return
     * @author 陈鹏
     */
    List<DispatchTicket> list(DispatchTicket dispatchTicket);
    //xpj
    List<DispatchTicket> selectByCarNumber(String carNumber);

    List<DispatchTicket> selectHisByCarNumber(String carNumber);

    /**
     * 通过订单号获得对应订单
     * @param ticketId
     * @return
     */
    DispatchTicket selectByTicketId(String ticketId);


    List<DispatchTicket> statusList();

    int getTodayAddQuantity();

    List<DispatchTicket> selectAllTicketByCarNumber(String number);


    List<DispatchTicket> selectAllByCarNumberContainsOrder(DispatchTicket dispatchTicket);

    List<String> getChangeOfDispatchQuantitySixMonths();

    int getDispatchUnfinishedQuantity();

    int updateByTicketId(DispatchTicket dispatchTicket);

    /**
     * 查询所有运输中调度单列表
     * @return
     * @author huangguilong
     */
    List<DispatchTicket> listForTransportation(DispatchTicket dispatchTicket);

    Integer getDelayNumByDate(Date date);

    Integer getDelayNumByMonth(Date date);

    List<String> getChangeOfDispatchQuantityYear();

    List<String> getChangeOfDispatchQuantityOneMonth();

    DispatchTicket selectCarByDispatchTicketId(String ticketId);
}